package com.vichat.utils;

import com.alibaba.fastjson.serializer.SimplePropertyPreFilter;
import com.vichat.online.entity.StatOnlineUser;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import java.util.HashMap;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class ResUtil {

    private static transient final Logger logger = LoggerFactory.getLogger(ResUtil.class);


    public static ExecutorService userExec0 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec1 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec2 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec3 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec4 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec5 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec6 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec7 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec8 = Executors.newFixedThreadPool(10);
    public static ExecutorService userExec9 = Executors.newFixedThreadPool(10);

    public static void startRoomMicRecordDealer(Thread recordDeal, long mod) {

        if (mod == 0) {
            userExec0.execute(recordDeal);
        } else if (mod == 1) {
            userExec1.execute(recordDeal);
        } else if (mod == 2) {
            userExec2.execute(recordDeal);
        } else if (mod == 3) {
            userExec3.execute(recordDeal);
        } else if (mod == 4) {
            userExec4.execute(recordDeal);
        } else if (mod == 5) {
            userExec5.execute(recordDeal);
        } else if (mod == 6) {
            userExec6.execute(recordDeal);
        } else if (mod == 7) {
            userExec7.execute(recordDeal);
        } else if (mod == 8) {
            userExec8.execute(recordDeal);
        } else {
            userExec9.execute(recordDeal);
        }
    }
}
